package com.siblings.loan.ui.user.impl

import com.siblings.http.callback.StringCallback
import com.siblings.loan.http.ApiService
import com.siblings.loan.http.HttpHelper
import com.siblings.loan.http.IHttpCallback
import org.json.JSONObject

/**
 * Siblings
 * @Author wwdeng
 * @CreateTime: 2024/7/18 16:26
 * @Annotation：意见反馈 Model 实现
 */
class SibUserFeedbackModelImpl {

    /**
     * 上传图片
     */
    fun uploadSibImageAction(imgPath: String, callback: StringCallback){
        val httpUrl = ApiService.getHttpUrl(ApiService.API_URL.SIB_API_UPLOAD_FILE_URL)
        HttpHelper.uploadSibFileAction(httpUrl,imgPath,callback)
    }

    /**
     * 提交反馈
     */
    fun submitSibFeedbackAction(params: JSONObject, callback: IHttpCallback){
        val httpUrl = ApiService.getHttpUrl(ApiService.API_URL.SIB_API_FEEDBACK_URL)
        HttpHelper.postSibAction(httpUrl,params,callback)
    }
}